{if $errors}
	$.growl.settings.noticeElement($('.growl-error-container'));
	{foreach from="`$errors`" item="error"}
		{if $error == 'TITLE'}
			$.growl('ERROR', 'Title must be specified.');
			$.growl.settings.displayTimeout+=2000;
		{/if}
		{if $error == 'TITLE_UNIQUE'}
			$.growl('ERROR', 'Title must be unique.');
			$.growl.settings.displayTimeout+=2000;
		{/if}
	{/foreach}
{/if}

{if $success}
	{if $range_id}
		window.location = '/admin/shop/ranges/edit/{$range_id}';
	{else}
		$.growl.settings.noticeElement($('.growl-message-container'));
		$.growl('UPDATED', 'The range has been updated.');
	{/if}
{/if}

